import wtforms

from validators import BaseForm, BasePageForm


class RoleForm(BaseForm):
    """
    角色表单校验类
    """
    id = wtforms.IntegerField()
    appCode = wtforms.StringField("应用编码")
    name = wtforms.StringField("角色名称", [wtforms.validators.DataRequired(message="角色名称不能为空")])
    code = wtforms.StringField("唯一编码", [wtforms.validators.DataRequired(message="唯一编码不能为空")])
    roleType = wtforms.StringField("角色类型<sys_role_type>", [wtforms.validators.DataRequired(message="角色类型<sys_role_type>不能为空")])
    enabled = wtforms.StringField("是否启用", [wtforms.validators.DataRequired(message="是否启用不能为空")])
    remark = wtforms.StringField("备注")
    createUser = wtforms.StringField("创建用户")
    updateUser = wtforms.StringField("更新用户")


class RolePageForm(BasePageForm):
    """
    角色分页校验类
    """
    pass
